import { ref } from "vue";
import Comment from "./comment";
export let stageArr = ref([]);
export default class Stage {
  // 道具
  constructor(width = Comment.blockSize, height = Comment.blockSize) {
    this.width = width;
    this.height = height;
  }
  create(x, y, cellNo, type, imgSrc) {
    let stage = document.createElement("img");
    stage.id = `stage-${cellNo}`;
    // stage.src = require("../../assets/speed.png");
    stage.src = imgSrc;
    stage.style.width = Comment.stoneWidth + "px";
    stage.style.height = Comment.stoneHeight + "px";
    stage.style.position = "absolute";
    stage.style.top = y + "px";
    stage.style.left = x + "px";
    stageArr.value.push([x, y, type, cellNo]);
    document.getElementById("box").appendChild(stage);
  }
}
